

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>商城购物车界面</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/carts.css"/>
    <script src="js/jquery-3.6.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/cart.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="head">
    <div class="shouye_head">
        <a href="first.jsp">商城首页</a>
        <a href="GotoOrderServlet">订单界面</a>
    </div>
</div>
<div style="width: 1100px; margin: 10px auto; border: 1px solid #ccc; padding: 10px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);">
    <form action="goods.do" method="post">
        <input type="text" class="text" name="goods" placeholder="请输入商品名称进行搜索">
        <button><img src="images/搜索图标.png" width="40px"></button>
    </form>
    <table class="biao" style="width: 100%; border-collapse: collapse;">
        <tr style="background-color: #f2f2f2; text-align: center;">
            <th style="padding: 10px;">商品图片</th>
            <th style="padding: 10px;">商品价格</th>
            <th style="padding: 10px;">已选数量</th>
            <th style="padding: 10px;">删除</th>
            <th style="padding: 10px;">购买</th>
        </tr>
        <c:forEach items="${goods}" var="car">
            <tr style="text-align: center;">
                <td style="padding: 10px;">
                    <a href="UpdateCarServlet?id=${car.id}&goods_sprice=${car.goodsprice}&num=${car.num}">
                        <img src="images/${car.goodspic}" style="max-width: 150px; height: auto;">
                    </a>
                </td>
                <td style="padding: 10px;">${car.goodsprice}元</td>
                <td style="padding: 10px;">${car.num}</td>
                <td style="padding: 10px;"><a href="DeleteCarServlrt?id=${car.id}"><img src="images/购物车.png" style="max-width: 50px;"></a></td>
                <td style="padding: 10px;"><a href="BuyCarGoodsSerclet?id=${car.id}"><img src="images/购物车.png" style="max-width: 50px;"></a></td>
            </tr>
        </c:forEach>
    </table>
    <ul>
        <c:forEach items="${pages}" var="page">
            <li>
                <a href="GotoCarServlet?current=${page.pageNo}&id=${car.id}">${page.pageNo}</a>
            </li>
        </c:forEach>

        <li>
            第${current}页/共${total}页
        </li>
    </ul>
</div>
<div class="payment">
    <div class="cart-pay">
        <div class="pay-left">
            <div class="select_all">
                <input type="checkbox" class="all each">
                全选
            </div>
            <div class="goods_num">
                已选择数量:
                <span>0</span>
                件
            </div>
        </div>
        <div class="pay-right">
            <div class="right_jie">
                <div class="btn">
                    <a href="#">结算</a>
                </div>
                <div class="price-sum">
                    <div class="price-show">总价是：</div>
                    <div class="show-money">
                        ￥
                        <span>00.00</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

</script>
</body>
</html>
